﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Datamining.Models
{
    public class Items
    {
        public int id { get; set; }
        public string itemName { get; set; }
        public string date { get; set; }
        public string linkIMDB { get; set; }
        private int[] genres = new int[0];

        public void InsertInGenre(int genreTrueOrFalse)
        {
            genres = IncreaseArrayItems(genres, genreTrueOrFalse);
        }

        private int[] IncreaseArrayItems(int[] original, int itemId)
        {
            int length = original.Count();
            int[] destination = new int[length + 1];

            Array.Copy(original, 0, destination, 0, length);
            destination[length] = itemId;

            return destination;
        }
    }
}
